#!/bin/bash

sum=0


if [ $# -lt 2 ];then
 echo "not enough param"
elif [ $1 -eq $2 ];then
 echo "value:$1"
elif [ $1 -lt $2 ];then
for ((i=$1;i<=$2;i++))
do	
	sum=$[$sum+$i]
done
 echo "value:$sum"
else
for ((i=$2;i<=$1;i++))
do
        sum=$[$sum+$i]
done    
 echo "value:$sum"
fi	
